import DBConnection from "../../service/unit/mysql/DBConnection";

export interface IData {
    name:string
    password:string
}

export default function updateUserAccount(conn:DBConnection, data:IData) {
    return update(conn, data);
}

function update(conn:DBConnection, data:IData) {
    const {name, password} = data;
    const TABLE_NAME = 'user';
    return conn.Update.update(TABLE_NAME,{password},{KEY:name,SIGN:'=',VALUE:password});
}